package com.sptpc.demo.service.impl;

import com.sptpc.demo.mapper.OrderMapper;
import com.sptpc.demo.service.IOrderService;
import com.sptpc.demo.vo.OrderWithItemsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderService implements IOrderService {
    @Autowired
    private OrderMapper orderMapper;
    @Override
    public OrderWithItemsVo selectOrederById(Long id) {
        return orderMapper.selectOrderWithItemsById(id);
    }

    @Override
    public OrderWithItemsVo selectOrederByIdWithCustomer(Long id, String customer) {
        return orderMapper.selectOrderWithItemsByIdandcustomer(id,customer);
    }
}
